//
//  UILabel+Extension.m
//  Ulife
//
//  Created by 马胜 on 2016/12/6.
//  Copyright © 2016年 Snail. All rights reserved.
//

#import "UILabel+Extension.h"

@implementation UILabel (Extension)

- (void)setLabelText:(NSString *)text textColor:(UIColor *)textColor font:(UIFont *)font{

    if (text != nil) {
        self.text = text;
    }
    self.textColor = textColor;
    self.font = font;
    
}

- (CGSize)labelSizeWithMaxiSize:(CGSize)maxiSize numberOfLines:(NSInteger)numberOfLines{

    self.numberOfLines = numberOfLines;

    CGSize Size = [self sizeThatFits:maxiSize];
    
    return Size;
}

@end
